package com.example.statement.machine.deadlock;

public class DeadLock {

    public static void main(String[] args) {
        final GrabLock1 grabLock1 = new GrabLock1();

        final GrabLock2 grabLock2 = new GrabLock2();

        new Thread(new Runnable() {
            @Override
            public void run() {
                grabLock1.getLock1(grabLock2);
            }
        }).start();

        new Thread(new Runnable() {
            @Override
            public void run() {
                grabLock2.getLock1(grabLock1);
            }
        }).start();


    }


}
